﻿using HelenServer.Migrator;

namespace Microsoft.Extensions.DependencyInjection;

public static class ServiceCollectionExtensions
{
    public static IServiceCollection AddZentaoMigrator(this IServiceCollection services)
    {
        services.AddOptions<ZentaoDbOptions>()
            .Configure<IConfiguration>((opts, cfg) =>
            {
                cfg.Bind(ZentaoDbOptions.Position, opts);
            });

        return services;
    }
}